﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace CafeWebsite
{
	/// <summary>
	/// Summary description for WebService1
	/// </summary>
	[WebService(Namespace = "http://tempuri.org/")]
	[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
	[System.ComponentModel.ToolboxItem(false)]
	// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
	// [System.Web.Script.Services.ScriptService]
	public class WebService1 : System.Web.Services.WebService
	{

		[WebMethod(Description = "Send SMS simulation")]//Description about web method
		public string SendSMS(string user, string pass, string phonenumber, string content) // Declaration of Method
		{
			int phone;

			if (int.TryParse(phonenumber, out phone) && content.Length <= 160)
			{
				return "OK";
			}
			else
			{
				return "Fail";
			}
		}

		[WebMethod(Description = "Adds Two Number And return result")]

		public string Add(int firstno, int secondno)
		{

			double result = firstno + secondno;

			return result.ToString();

		}

	}
}
